import request from '@/utils/request';

import { convertPostDetail } from '@/api/formatter';

//根据 pid 查询文章详情
export function getPostDetailByPid(pid: number) {
    return request({
        url: '/news/' + pid,
        method: 'GET',
    }).then(data => {
        return convertPostDetail(data);
    });
}
